package com.business.exam.service.impl;

import java.util.List;
import com.business.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.business.exam.mapper.ExamQbNameMapper;
import com.business.exam.domain.ExamQbName;
import com.business.exam.service.IExamQbNameService;

/**
 * 题库名称Service业务层处理
 *
 * @author zhanglele
 * @date 2023-11-17
 */
@Service
public class ExamQbNameServiceImpl implements IExamQbNameService
{
    @Autowired
    private ExamQbNameMapper examQbNameMapper;

    /**
     * 查询题库名称
     *
     * @param qbNameId 题库名称主键
     * @return 题库名称
     */
    @Override
    public ExamQbName selectExamQbNameByQbNameId(Long qbNameId)
    {
        return examQbNameMapper.selectExamQbNameByQbNameId(qbNameId);
    }

    /**
     * 查询题库名称列表
     *
     * @param examQbName 题库名称
     * @return 题库名称
     */
    @Override
    public List<ExamQbName> selectExamQbNameList(ExamQbName examQbName)
    {
        return examQbNameMapper.selectExamQbNameList(examQbName);
    }

    /**
     * 新增题库名称
     *
     * @param examQbName 题库名称
     * @return 结果
     */
    @Override
    public int insertExamQbName(ExamQbName examQbName)
    {
        examQbName.setCreateTime(DateUtils.getNowDate());
        return examQbNameMapper.insertExamQbName(examQbName);
    }

    /**
     * 修改题库名称
     *
     * @param examQbName 题库名称
     * @return 结果
     */
    @Override
    public int updateExamQbName(ExamQbName examQbName)
    {
        examQbName.setUpdateTime(DateUtils.getNowDate());
        return examQbNameMapper.updateExamQbName(examQbName);
    }

    /**
     * 批量删除题库名称
     *
     * @param qbNameIds 需要删除的题库名称主键
     * @return 结果
     */
    @Override
    public int deleteExamQbNameByQbNameIds(Long[] qbNameIds)
    {
        return examQbNameMapper.deleteExamQbNameByQbNameIds(qbNameIds);
    }

    /**
     * 删除题库名称信息
     *
     * @param qbNameId 题库名称主键
     * @return 结果
     */
    @Override
    public int deleteExamQbNameByQbNameId(Long qbNameId)
    {
        return examQbNameMapper.deleteExamQbNameByQbNameId(qbNameId);
    }
}
